home *** CD-ROM | disk | FTP | other *** search
- property download, fileSeperator, projectName
- global downloadList
-
- on getPropertyDescriptionList me
- description = [:]
- addProp(description, #projectName, [#default: EMPTY, #format: #string, #comment: "SAVE FOLDER NAME:"])
- addProp(description, #download, [#default: EMPTY, #format: #string, #comment: "DOWNLOAD:", #range: ["DESKTOP", "OTHER"]])
- return description
- end
-
- on beginSprite me
- fileSeperator = fileSeperator()
- end
-
- on mouseUp me
- if downloadList.count = 0 then
- else
- if download = "DESKTOP" then
- savePath = baSysFolder("desktop")
- else
- myFile = new(xtra("fileio"))
- setFilterMask(myFile, "Folder")
- savePath = displaySave(myFile, "Download", "save here")
- myFile = 0
- the itemDelimiter = fileSeperator
- lastPath = savePath.item[savePath.item.count]
- savePath = savePath.item[1..savePath.item.count - 1]
- the itemDelimiter = "."
- if lastPath.item.count = 2 then
- lastPath = lastPath.item[1]
- end if
- if lastPath = "save here" then
- savePath = savePath & fileSeperator
- else
- savePath = savePath & fileSeperator & lastPath & fileSeperator
- end if
- end if
- savePath = savePath & projectName & fileSeperator
- repeat with x = 1 to downloadList.count
- filePath = the moviePath & downloadList[x][1] & fileSeperator & downloadList[x][2] & "." & downloadList[x][3]
- saveFile = savePath & downloadList[x][1] & fileSeperator & downloadList[x][2] & "." & downloadList[x][3]
- copyFile = baCopyFileProgress(filePath, saveFile, "always", "download location", "cancel", 0)
- end repeat
- captions = "CAPTIONS" & fileSeperator & "CAPTIONS.DOC"
- filePath = the moviePath & captions
- saveFile = savePath & captions
- copyFile = baCopyFileProgress(filePath, saveFile, "always", "download location", "cancel", 0)
- downloadList = []
- go("DOWNLOAD")
- end if
- end
-